<?php
$this->breadcrumbs=array(
	'Jobs'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Thêm công việc', 'url'=>array('create')),
	array('label'=>'Danh sách công việc', 'url'=>array('admin')),
);

?>

<h1>Danh sách công việc</h1>
<div class="search-form">
<?php $this->renderPartial('_searchByDateAdmin',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->
<?php $this->widget('zii.widgets.grid.StatisticsCGridView', array(
	'id'=>'job-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		'department',
		array(
			'name' => 'received_time' ,
			'value' => 'Common::convertStringToDateTime($data->received_time)' ,
			'filter'=>'single',
			'class' => 'SYDateColumn' ,
			'htmlOptions'=>array('width'=>'100px'),
		),
		array(
			'name' => 'finished_time' ,
			'value' => 'Common::convertStringToDateTime($data->finished_time)' ,
			'filter'=>'single',
			'class' => 'SYDateColumn' ,
			'htmlOptions'=>array('width'=>'100px'),
		),
		array(
			'name' => 'job_group_id' ,
			'value'=>'JobGroup::model()->findByPk($data->job_group_id)->name' ,
			'filter'=>CHtml::activeDropDownList($model,'job_group_id', CHtml::listData(JobGroup::model()->findAll(), 'id', 'name') , array('prompt'=>'Tất cả')),
			'htmlOptions'=>array('width'=>'90px'),
		),
		'detail',
		/*
		'job_type_id',
		'is_deleted',
		'solution',
		'user_id',
		*/
		array(
			'header'=>'Thao tác',
			'class'=>'CButtonColumn',
		),
	),
)); ?>
